package day4;

public class Student {
    private void study(){
        System.out.println("开始学习");
    }
    public Integer math(Integer n,Integer m){
        System.out.println("计算加法:"+n+"+"+m);
        return m+n;
    }

    public static void main(String[] args) {
        Student s = new Student();
        TestInvokeMethod.base(s,"study");
        System.out.println(TestInvokeMethod.base(s, "math", 8, 11));
        Teacher t = new Teacher();
        TestInvokeMethod.base(t,"school","老孙");
        System.out.println(TestInvokeMethod.base(t,"getInfo"));
        TestInvokeMethod.base2(t,"setScore",66,100);
    }
}
class Teacher{
    public void school(String name){
        System.out.println(name+"开始上课");
    }
    public String getInfo(){
        System.out.println("获取老师信息");
        return "老孙,40岁...";
    }
    public void setScore(int score,Integer mysql){
        System.out.println("成绩总和："+(score+mysql));
    }
}
